using WeatherSystem.API.Models;

namespace WeatherSystem.API.Repositories
{
    /// <summary>
    /// 用户Repository接口
    /// </summary>
    public interface IUserRepository : IRepository<User>
    {
        Task<User?> GetByUsernameAsync(string username);
        Task<User?> GetByEmailAsync(string email);
        Task<bool> IsUsernameExistsAsync(string username);
        Task<bool> IsEmailExistsAsync(string email);
        Task<PagedResult<object>> GetUsersPagedAsync(
            int page, int pageSize, string? search = null, 
            UserRole? role = null, bool? isActive = null);
        Task<Dictionary<string, int>> GetUserStatisticsAsync();
        Task<List<User>> GetActiveUsersAsync();
        Task<List<User>> GetUsersByRoleAsync(UserRole role);
    }
}